Quản lý website giới thiệu và bán điện thoại di động ASP.net
19.296 lượt xem;
- capnhatsp.aspx
- project /
1 <%@ Page Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true" CodeFile="capnhatsp.aspx.cs" Inherits="Default3" Title="Cap nhat san pham" %>
2 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
3 <h1 align="center"><b>CẬP NHẬT SẢN PHẨM</b></h1>
4 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyDBConnectionString %>"
5 ProviderName="<%$ ConnectionStrings:MyDBConnectionString.ProviderName %>"
6 SelectCommand="SELECT masp, tensp, gia, soluong, dacdiem, baohanh, khuyenmai, kieudang, phongcach, anh FROM tblsanpham"
7 UpdateCommand="UPDATE tblsanpham SET masp =@masp, tensp =@tensp, gia =@gia, soluong =@soluong, dacdiem =@dacdiem, baohanh =@baohanh, khuyenmai =@khuyenmai, kieudang =@kieudang, phongcach =@phongcach, anh =@anh WHERE (masp = @masp)" DeleteCommand="delete from tblsanpham where masp=@masp">
8 </asp:SqlDataSource>
9 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
10 AutoGenerateEditButton="True" AutoGenerateDeleteButton="True"
11 DataSourceID="SqlDataSource1" Width="100%" DataKeyNames="masp" ForeColor="Black">
12 </asp:GridView>
13 </asp:Content>
2 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
3 <h1 align="center"><b>CẬP NHẬT SẢN PHẨM</b></h1>
4 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyDBConnectionString %>"
5 ProviderName="<%$ ConnectionStrings:MyDBConnectionString.ProviderName %>"
6 SelectCommand="SELECT masp, tensp, gia, soluong, dacdiem, baohanh, khuyenmai, kieudang, phongcach, anh FROM tblsanpham"
7 UpdateCommand="UPDATE tblsanpham SET masp =@masp, tensp =@tensp, gia =@gia, soluong =@soluong, dacdiem =@dacdiem, baohanh =@baohanh, khuyenmai =@khuyenmai, kieudang =@kieudang, phongcach =@phongcach, anh =@anh WHERE (masp = @masp)" DeleteCommand="delete from tblsanpham where masp=@masp">
8 </asp:SqlDataSource>
9 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
10 AutoGenerateEditButton="True" AutoGenerateDeleteButton="True"
11 DataSourceID="SqlDataSource1" Width="100%" DataKeyNames="masp" ForeColor="Black">
12 </asp:GridView>
13 </asp:Content>